<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>企业广告热度广告管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {

        });

        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/adv/hkEnterpriseHotAdv/">企业广告热度广告列表</a></li>
    <shiro:hasPermission name="adv:hkEnterpriseHotAdv:edit">
        <li><a href="${ctx}/adv/hkEnterpriseHotAdv/form">企业广告热度广告添加</a></li>
    </shiro:hasPermission>
</ul>
<form:form id="searchForm" modelAttribute="hkEnterpriseHotAdv" action="${ctx}/adv/hkEnterpriseHotAdv/" method="post"
           class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <ul class="ul-form">
        <li><label>企业广告：</label>
            <form:input path="enterprise.title" htmlEscape="false" maxlength="32" class="input-medium"/>
        </li>
        <li><label>标题：</label>
            <form:input path="title" htmlEscape="false" maxlength="100" class="input-medium"/>
        </li>
        <li><label>开始时间：</label>
            <input name="beginBeginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
                   value="<fmt:formatDate value="${hkEnterpriseHotAdv.beginBeginDate}" pattern="yyyy-MM-dd"/>"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/> -
            <input name="endBeginDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
                   value="<fmt:formatDate value="${hkEnterpriseHotAdv.endBeginDate}" pattern="yyyy-MM-dd"/>"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
        </li>
        <li><label>是否给奖励：</label>
            <form:select path="state" class="input-medium">
                <form:option value="" label=""/>
                <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value"
                              htmlEscape="false"/>
            </form:select>
        </li>
        <li><label>用户：</label>
            <sys:tableSelect id="user" name="user.id" value="${hkEnterpriseHotAdv.user.id}" labelName="user.name"
                             labelValue="${hkEnterpriseHotAdv.user.name}" title="选择用户"
                             url="${ctx}/sys/user/hkUser/list?1=1" checked="1" cssClass="input-medium"/>
        </li>
        <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
        <li class="clearfix"></li>
    </ul>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>企业广告</th>
        <th>标题</th>
        <th>副标题</th>
        <th>开始时间</th>
        <th>结束时间</th>
        <th>是否给奖励</th>
        <th>用户</th>
        <%--<th>封面图片</th>--%>
        <th>乐币</th>
        <th>总乐币</th>
        <th>系统币种</th>
        <th>更新时间</th>
        <th>备注</th>
        <th>展示类型</th>
        <shiro:hasPermission name="adv:hkEnterpriseHotAdv:edit">
            <th>操作</th>
        </shiro:hasPermission>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="hkEnterpriseHotAdv">
        <tr>
            <td><a href="${ctx}/adv/hkEnterpriseHotAdv/form?id=${hkEnterpriseHotAdv.id}">
                    ${hkEnterpriseHotAdv.enterprise.title}
            </a></td>
            <td>
                    ${hkEnterpriseHotAdv.title}
            </td>
            <td>
                    ${hkEnterpriseHotAdv.subtitle}
            </td>
            <td>
                <fmt:formatDate value="${hkEnterpriseHotAdv.beginDate}" pattern="yyyy-MM-dd"/>
            </td>
            <td>
                <fmt:formatDate value="${hkEnterpriseHotAdv.endDate}" pattern="yyyy-MM-dd"/>
            </td>
            <td>
                    ${fns:getDictLabel(hkEnterpriseHotAdv.state, 'yes_no', '')}
            </td>
            <td>
                    ${hkEnterpriseHotAdv.user.name}
            </td>
            <td>
                    ${hkEnterpriseHotAdv.integral}
            </td>
            <td>
                    ${hkEnterpriseHotAdv.integralCount}
            </td>
            <td>
                    ${fns:getDictLabels(hkEnterpriseHotAdv.currencyType, 'hk_currency_type', '')}
            </td>

                <%--<td>
                    <img src="${hkEnterpriseHotAdv.coverImgSrc}" width="120px" height="120px">
                </td>--%>

            <td>
                <fmt:formatDate value="${hkEnterpriseHotAdv.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
            </td>
            <td>
                    ${hkEnterpriseHotAdv.remarks}
            </td>
            <td>
                    ${fns:getDictLabel(hkEnterpriseHotAdv.showType, 'hk_adv_showType', '')}
            </td>
            <shiro:hasPermission name="adv:hkEnterpriseHotAdv:edit">
                <td>
                    <a href="${ctx}/adv/hkEnterpriseHotAdv/form?id=${hkEnterpriseHotAdv.id}">修改</a>
                    <a href="${ctx}/adv/hkEnterpriseHotAdv/delete?id=${hkEnterpriseHotAdv.id}"
                       onclick="return confirmx('确认要删除该企业广告热度广告吗？', this.href)">删除</a>
                </td>
            </shiro:hasPermission>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>